package io.renren.enums;

import java.util.Arrays;
import java.util.List;

public enum UpScalarEnum {
    Latent("Latent"),
    Latent_a("Latent(antialiased)"),
    Latent_b("Latent(bicubic)"),
    Latent_b_a("Latent(bicubic,antialiased)"),
    Latent_n("Latent(nearest)"),
    Latent_n_e("Latent(nearest-exact)"),
    None("None"),
    Lanczos("Lanczos"),
    Nearest("Nearest"),
    DAT_2("DAT x2"),
    DAT_3("DAT x3"),
    DAT_4("DAT x4"),
    ESRGAN_4x("ESRGAN_4x"),
    LDSR("LDSR"),
    R_ESRGAN_4x("R-ESRGAN 4x+"),
    R_ESRGAN_4x_Anime6B("R-ESRGAN 4x+ Anime6B"),
    ScuNET_GAN("ScuNET GAN"),
    ScuNET_PSNR("ScuNET PSNR"),
    SwinIR_4x("SwinIR 4x");

    private String name;

    UpScalarEnum(String name){
           this.name = name;
    }

    public String getName() {
        return name;
    }

    public static UpScalarEnum getEnumByName(String name) {
        for (UpScalarEnum upScalarEnum : UpScalarEnum.values()) {
            if (upScalarEnum.getName().equals(name)) {
                return upScalarEnum;
            }
        }
        return null;
    }

    public static List<String> getAllNames() {
        return Arrays.stream(UpScalarEnum.values()).map(UpScalarEnum::getName).toList();
    }
}
